# source/bst/modCalculatable.py

# Calculatable interface
# Ben Terris
# 11/20/2007
class Calculatable(object):
	"""Required methods to be usable in our calculator. Implementations overriding 
	these methods must be provided by each class. All operations return a new object without changing the
	original objects. Errors and unsupported operations return None."""

	def __add__(self, other):
	        '''Produce a sum of the lhs and rhs objects.'''
	
	def __sub__(self, other):
			'''Produce the difference of the lhs and rhs objects.'''

	def __negate__(self):
	        '''Return the negative of this object.'''
	
	def __div__(self, other):
			'''Produce the result of dividing the lhs and rhs objects.'''
	
	def __mul__(self, other):
			'''Produce the product of the lhs and rhs objects.'''

	def __invert__(self):
			'''Invert this object.'''
	
	def __square__(self):
			'''Return the square of this object.'''

	def __str__(self):
	        '''Return the string value of this Calculatable ojbect.'''